<template>

  <table class="ideaTable personTable2" v-if="data.length>0">
          <colgroup>
            <col width="160px" />
            <col width />
          </colgroup>
          <tr>
            <td>{{data[0].reviewItemOne}}</td>
            <td>
              <strong>{{varname}}</strong>
            </td>
          </tr>
          <tr>
            <td>{{data[1].reviewItemOne}}</td>
            <td>
                <template v-if="flag1">
                    <el-input v-model="bzPer"></el-input>
                </template>
            </td>
          </tr>
          <tr>
            <td>{{data[2].reviewItemOne}}</td>
            <td>
              <p style="text-align:left;">
                <span>{{data[0].createTime.split(' ')[0].split('-')[0]+'年'+data[0].createTime.split(' ')[0].split('-')[1]+'月'+data[0].createTime.split(' ')[0].split('-')[2]}}</span>
                日，{{varname}}进行了应急预案专家评审工作。
                <br />评审专家组参照《电力企业应急预案评审与备案细则》，从合法性、完整性、针对性、实用性、科学性、操作性和衔接性等方面，对应急预案的层次结构、语言文字、要素内容、附件项目等进行了系统的审查，并查看了应急预案桌面演练的记录，形成如下评审意见:
              </p>
            <el-input type="textarea" class='addSuggest' v-model="suggest" :readonly="!flag"></el-input>
              
            </td>
          </tr>
          <tr>
            <td>
              评审专家组
              <br />一致认为：
            </td>
            <td>
              <el-input type="textarea" v-model="consensus" :readonly="!flag"></el-input>
            </td>
          </tr>
          <tr>
            <td>评审专家（签字）：</td>
            <td class="sign-word">
              <div   >
                  <img v-for='(item,index) in signImg ' 
                style="width:120px;height:60px;padding:10px;float:left;" 
                :src="item" :key='index' alt="">
              </div>    
            </td>
          </tr>
          <tr>
            <td>备注</td>
            <td>
              <el-input type="textarea" v-model="remark" :readonly="!flag"></el-input>
            </td>
          </tr>
        </table>
</template>
<script>
export default {
   props:['data','signImg'],
   data(){
    return {
      varname:'',
      consensus:'',
      remark:'',
      suggest:'',
      bzPer:'',
      flag:true,
      flag1:false
    }
   },
   mounted(){
          if (this.data[0].remarks) {
            this.remark = this.data[0].remarks;
          }
           if (this.data[0].consensus) {
            this.consensus = this.data[0].consensus;
          }
           if (this.data[0].opinion) {
            this.suggest =  this.data[0].opinion;
          }

        this.varname = localStorage.planname.split('.')[0]
         var str = window.location.href
    if(str.indexOf('checkAssessed2')!=-1 || str.indexOf('onlineAssess2')!=-1){
      this.flag=false
    }else{
      this.flag=true
    }
    if(str.indexOf('onlineAssess2')!=-1){
      this.flag1=true
    }else{
      this.flag1=false
    }
   
         
   },
   watch:{
     'suggest':function(newv,oldv){
       this.$emit('sendSuggest',newv)
     },
     'remark':function(newv,oldv){
       this.$emit('sendRemark',newv)
     },
     
     'consensus':function(newv,oldv){
       this.$emit('sendConsensus',newv)
     }
   }
}
</script>
<style lang='less' >
.personTable2{
    .el-input__inner{
        border: none;
    }
}
   .el-textarea__inner {
        resize: none;
        border: 0;
        height: 200px;
        cursor: pointer;
      }
      .el-input__inner {
        border: 0;
        cursor: pointer;
      }
      table{
        width:100%;
        border-collapse:collapse; 
        border-spacing:0;
        border:0;
        line-height: 40px;
        text-align: center;
        position: relative;
        font-size: 14px;
        columns: #999999;
        th{
            border-color: #dddddd;
        }
        tr:first-child{
            th{
                
            font-weight: bold;
            }
        }
        td{
            border-color: #dddddd;
            padding:10px;
            line-height: 24px;
            .radioImg{
                width:25px;
                height:25px;
                display: block;
                margin: 0 auto;
            }
        }
      
        td.sign-word{
            img{
                float: left;
                width:120px;
                height:60px;
            }
            i{
             line-height:36px;
             background:#edf4fe;
             padding:0 15px;
             border-radius:4px;
             color:#4080fe;
             cursor: pointer;
             float:left;
             border: 1px solid #edf4fe;
            }
            i:hover{
              border: 1px solid #4080fe;
            }
          }
    }
</style>
